package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DzXiangceMapper;
import com.ruoyi.system.domain.DzXiangce;
import com.ruoyi.system.service.IDzXiangceService;


import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.mapper.DzHuiyuanMapper;
import com.ruoyi.system.domain.DzHuiyuan;
import com.ruoyi.system.service.IDzHuiyuanService;

/**
 * 楼盘相册Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-16
 */
@Service
public class DzXiangceServiceImpl implements IDzXiangceService 
{
    @Autowired
    private DzXiangceMapper dzXiangceMapper;

    @Autowired
    private ISysRoleService sysRoleService;

    @Autowired
    private IDzHuiyuanService dzHuiyuanService;

    /**
     * 查询楼盘相册
     * 
     * @param xcId 楼盘相册主键
     * @return 楼盘相册
     */
    @Override
    public DzXiangce selectDzXiangceByXcId(Long xcId)
    {
        return dzXiangceMapper.selectDzXiangceByXcId(xcId);
    }

    /**
     * 查询楼盘相册列表
     * 
     * @param dzXiangce 楼盘相册
     * @return 楼盘相册
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<DzXiangce> selectDzXiangceList(DzXiangce dzXiangce)
    {

        //权限控制
        return dzXiangceMapper.selectDzXiangceList(dzXiangce);
    }

    @Override
    public List<DzXiangce> selectDzXiangceListWeb(DzXiangce dzXiangce)
    {
        return dzXiangceMapper.selectDzXiangceList(dzXiangce);
    }

    /**
     * 新增楼盘相册
     * 
     * @param dzXiangce 楼盘相册
     * @return 结果
     */
    @Override
    public int insertDzXiangce(DzXiangce dzXiangce)
    {
        return dzXiangceMapper.insertDzXiangce(dzXiangce);
    }

    /**
     * 修改楼盘相册
     * 
     * @param dzXiangce 楼盘相册
     * @return 结果
     */
    @Override
    public int updateDzXiangce(DzXiangce dzXiangce)
    {
        return dzXiangceMapper.updateDzXiangce(dzXiangce);
    }

    /**
     * 批量删除楼盘相册
     * 
     * @param xcIds 需要删除的楼盘相册主键
     * @return 结果
     */
    @Override
    public int deleteDzXiangceByXcIds(Long[] xcIds)
    {
        return dzXiangceMapper.deleteDzXiangceByXcIds(xcIds);
    }

    /**
     * 删除楼盘相册信息
     * 
     * @param xcId 楼盘相册主键
     * @return 结果
     */
    @Override
    public int deleteDzXiangceByXcId(Long xcId)
    {
        return dzXiangceMapper.deleteDzXiangceByXcId(xcId);
    }
}
